﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StudentManagement.Entity;
using Utilities;
using StudentManagement.DAL;

namespace StudentManagement.BLL
{
    public class AlterStudenInfoBussiness
    {
        AlterStudentInfoData alterStudentInfoData = new AlterStudentInfoData();
        public bool AddStudentInfo(StudentInfoEntity studentInfoEntity)
        {
            
            studentInfoEntity.Password = Tools.GetMD5(studentInfoEntity.Password);
            return alterStudentInfoData.AddStudentInfo(studentInfoEntity);
        }
        public bool IsExistAccount(string account)
        {
            return alterStudentInfoData.IsExistAccount(account);
        }
        public bool UpdatePwd(StudentInfoEntity studentInfoEntity)
        {
            studentInfoEntity.Password = Tools.GetMD5(studentInfoEntity.Password);
            return alterStudentInfoData.UpdatePwd(studentInfoEntity);
        }
    }
}
